Q54: Try to run the following program with and without the continue
statement. What would be the result?
// SPDX-License-Identifier: SOME IDENTIFIER
pragma solidity ^0.8.10;
contract ForLoopContract {
function getResult() public pure returns(uint) {
uint result;
// continue statement
for (uint i = 0; i< 10; i++) {
if (result > 30)
{
continue;
}
result += 10;
}
return result;
}
}
A. 100, 100
B. 40, 40
C. 100, 40
D. 40, 100
Q55: What is the default value of uint in Solidity?
A. null
B. undefined
C. 0
D. We have to initialize uint, otherwise it won’t compile
Q56: Which among the following is the smallest subunit of Ether?
A. Wei
B. Kwei